"use strict";var LowPassFilter=function(t){this.cutoffHz=t,this.filterValue=NaN,this.lastSampleTimestamp=window.performance.now()};LowPassFilter.prototype.update=function(t){var e=window.performance.now(),i=.001*(e-this.lastSampleTimestamp),a=1/i;this.lastSampleTimestamp=e;var s=Math.cos(2*Math.PI*this.cutoffHz/a),r=s-1+Math.sqrt(s*s-4*s+3);0===this.cutoffHz||isNaN(this.filterValue)?this.filterValue=t:this.filterValue=(1-r)*this.filterValue+r*t},LowPassFilter.prototype.getValue=function(){var t=0;return this&&!isNaN(this.filterValue)&&(t=this.filterValue),t},LowPassFilter.prototype.forceNextValue=function(){this.filterValue=NaN},LowPassFilter.prototype.forceValue=function(t){this.forceNextValue(),this.update(t)};